<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
  <fieldset>
    <legend>Sign in</legend>
    <%= devise_error_messages! %>

    <div class="control-group">
      <%= f.label :username, :class => 'control-label' %>
      <div class="controls">
        <%= f.text_field :username, :class => 'text_field' %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :password, :class => 'control-label' %>
      <div class="controls">
        <%= f.password_field :password, :class => 'password_field' %>
      </div>
    </div>

    <% if devise_mapping.rememberable? -%>
      <label class="checkbox">
        <%= f.check_box :remember_me %> <%= f.label :remember_me %>
      </label>
    <% end -%>

    <div class="form-actions">
      <%= f.submit 'Sign in', :class => 'btn btn-primary' %>
      <%= render "links" %>
    </div>
  </fieldset>
<% end %>
